﻿using DataModels.Enums.Home;
using SqlSugar;
using System;
using static DataModels.Enums.GeneralEnum;

namespace DataModels.Entities.HomeService
{
    /// <summary>
    /// 服务时间预约表
    /// </summary>
    [SugarTable]
    public class HomeServiceBooking
    {
        /// <summary>
        /// 预约ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public Guid UUID { get; set; } = Guid.NewGuid();

        /// <summary>
        /// 关联商品ID
        /// </summary>
        public Guid ProductUUID { get; set; }

        /// <summary>
        /// 关联的订单
        /// </summary>
        public Guid OrderUUID { get; set; }

        /// <summary>
        /// 关联服务时间规则ID
        /// </summary>
        //public Guid? RuleUUID { get; set; }

        /// <summary>
        /// 服务日期
        /// </summary>
        public DateTime ServiceDate { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public string StartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public string EndTime { get; set; }

        /// <summary>
        /// 预约数量
        /// </summary>
        public int BookingCount { get; set; } = 1;

        /// <summary>
        /// 用户ID
        /// </summary>
        public Guid UserID { get; set; }

        /// <summary>
        /// 联系人姓名
        /// </summary>
        public string ContactName { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        public string ContactPhone { get; set; }

        /// <summary>
        /// 预约状态（0-待确认，1-已确认，2-已取消，3-已完成）
        /// </summary>
        public BookingStatus BookingStatus { get; set; } = BookingStatus.PendingConfirmation;

        /// <summary>
        /// 预约备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 删除标记
        /// </summary>
        public Status IsDeleted { get; set; } = Status.Disable;
    }
}